package com.liujun.spring4.demo.aop.application.i18n.base;

import java.util.Locale;
import java.util.ResourceBundle;

/**
 * @author liujun
 * @version 0.0.1
 * @date 2018/09/11
 */
public class ResourceBundleLoad {

  public static void main(String[] args) {
    Locale locale = Locale.CHINA;
    ResourceBundle rb =
        ResourceBundle.getBundle("com/liujun/spring4/demo/application/i18n/base/base/resource", locale);
    System.out.println(rb.getString("greeting.common"));

    Locale locUs = Locale.US;
    ResourceBundle rb2 =
        ResourceBundle.getBundle("com/liujun/spring4/demo/application/i18n/base/base/resource", locUs);
    System.out.println(rb2.getString("greeting.common"));
  }
}
